#include <string>
using namespace std;
#include "deck.h"
const char Deck::_cards[] = {'A', '2', '3', '4', '5', '6', '7', '8', '9', 'T', 'J', 'Q', 'K', 'A', '2', '3', '4', '5', '6', '7', '8', '9', 'T', 'J', 'Q', 'K', 'A', '2', '3', '4', '5', '6', '7', '8', '9', 'T', 'J', 'Q', 'K', 'A', '2', '3', '4', '5', '6', '7', '8', '9', 'T', 'J', 'Q', 'K', 'A', '2', '3', '4', '5', '6', '7', '8', '9', 'T', 'J', 'Q', 'K'};
Deck::Deck()
{
	_nextCard=0;
}
char Deck::get_card(int rand)
{
	return _cards[rand];
}
int Deck::card_to_value(char card_char)
{
        int value;
        if (card_char=='2')value=2;
        else if (card_char=='3')value=3;
        else if (card_char=='4')value=4;
        else if (card_char=='5')value=5;
        else if (card_char=='6')value=6;
        else if (card_char=='7')value=7;
        else if (card_char=='8')value=8;
        else if (card_char=='9')value=9;
        else if (card_char=='T')value=10;
        else if (card_char=='J')value=10;
        else if (card_char=='Q')value=10;
        else if (card_char=='K')value=10;
        else if (card_char=='A')value=11;
        return value;
}

